﻿using System;
using Illinois.Core.Interfaces;
using Illinois.Core.Models;
using NUnit.Framework;

namespace Illinois.Core.Test.Models
{
  [TestFixture]
  public class Test_BurnDown
  {
    private const string Title = "title";
    private static readonly DateTime Start = new DateTime(2012, 10, 8);
    private static readonly DateTime End = new DateTime(2012, 10, 19);
    private const int InitialStoryPoints = 34;
    private const int ProjectId = 101;
    private readonly IBurnDown _burnDown = new BurnDown(Title, Start, End, InitialStoryPoints, ProjectId);

    [Test]
    public void Test_All_The_Flat_Properties_Of_A_New_BurnDown_Class()
    {
      Assert.AreEqual(0, _burnDown.Id);
      Assert.AreEqual(Title, _burnDown.Title);
      Assert.AreEqual(Start, _burnDown.Start);
      Assert.AreEqual(End, _burnDown.End);
      Assert.AreEqual(InitialStoryPoints, _burnDown.InitialStoryPoints);
    }

    [Test]
    public void Test_A_BurnDown_Class_Has_A_Collection_Of_Remaining_Story_Points()
    {
      Assert.IsNotNull(_burnDown.StoryPointsList);
    }
  }
}
